<template>
  <div class="identity-selector">
    <div class="selector-container">
      <div class="selector-header">
        <h2>欢迎来到智索真源</h2>
        <p>基于人工智能与区块链技术的任务外包协同管理平台</p>
        <div class="tagline">
          <span class="highlight">让企业外包从"经验决策"走向"智能决策"</span>
        </div>
      </div>
      
      <div class="identity-cards">
        <div class="identity-card investor" @click="selectIdentity('investor')">
          <div class="card-icon">
            <i class="fas fa-chart-line"></i>
          </div>
          <h3>我是投资者</h3>
          <p>了解项目投资价值与市场前景</p>
          <div class="card-features">
            <span>万亿级市场</span>
            <span>技术壁垒</span>
            <span>政策支持</span>
          </div>
        </div>
        
        <div class="identity-card enterprise" @click="selectIdentity('enterprise')">
          <div class="card-icon">
            <i class="fas fa-building"></i>
          </div>
          <h3>我是企业方</h3>
          <p>寻找可信赖的外包合作伙伴</p>
          <div class="card-features">
            <span>AI智能匹配</span>
            <span>区块链存证</span>
            <span>降本增效</span>
          </div>
        </div>
        
        <div class="identity-card student" @click="selectIdentity('student')">
          <div class="card-icon">
            <i class="fas fa-graduation-cap"></i>
          </div>
          <h3>我是大学生</h3>
          <p>获得实战经验与能力认证</p>
          <div class="card-features">
            <span>真实项目</span>
            <span>能力认证</span>
            <span>成长记录</span>
          </div>
        </div>
      </div>
      
      <div class="selector-footer">
        <p>选择您的身份，我们将为您展示最相关的内容</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'IdentitySelector',
  methods: {
    selectIdentity(identity) {
      // 触发父组件事件
      this.$emit('identity-selected', identity)
    }
  }
}
</script>

<style scoped>
.identity-selector {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.identity-selector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(6, 182, 212, 0.05) 50%, rgba(139, 92, 246, 0.05) 100%);
  pointer-events: none;
}

.selector-container {
  max-width: 1200px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.selector-header {
  margin-bottom: 4rem;
}

.selector-header h2 {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.selector-header p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.tagline {
  display: inline-block;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(10px);
}

.highlight {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.identity-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.identity-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 24px;
  padding: 3rem 2rem;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.identity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: all 0.3s ease;
}

.identity-card.investor::before {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.identity-card.enterprise::before {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.identity-card.student::before {
  background: linear-gradient(135deg, #10b981, #059669);
}

.identity-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.identity-card:hover::before {
  height: 6px;
}

.card-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.identity-card.investor .card-icon {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.identity-card.enterprise .card-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.identity-card.student .card-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.identity-card:hover .card-icon {
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-icon i {
  font-size: 2rem;
  color: white;
}

.identity-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
}

.identity-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.card-features {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-features span {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.selector-footer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .selector-header h2 {
    font-size: 2.2rem;
  }
  
  .selector-header p {
    font-size: 1.1rem;
  }
  
  .identity-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .identity-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .identity-selector {
    padding: 1rem;
  }
  
  .selector-header h2 {
    font-size: 1.8rem;
  }
  
  .tagline {
    padding: 0.8rem 1.5rem;
  }
  
  .highlight {
    font-size: 1rem;
  }
}
</style>
